package org.weasel.views;

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;

public class Welcome extends ViewPart {

	public static final String ID = "org.weasel.views.Welcome"; // TODO Needs to be whatever is mentioned in plugin.xml

	private Composite top = null;

	private Composite composite = null;

	private StyledText styledText = null;

	private Label label = null;

	@Override
	public void createPartControl(Composite parent) {
		// TODO Auto-generated method stub
		top = new Composite(parent, SWT.NONE);
		top.setLayout(new GridLayout());
		createComposite();
	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub

	}

	/**
	 * This method initializes composite	
	 *
	 */
	private void createComposite() {
		GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 2;
		composite = new Composite(top, SWT.NONE);
		composite.setLayout(gridLayout);
		label = new Label(composite, SWT.VERTICAL);
		label.setText("Label");
		label.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream("/logo klein.jpg")));
		styledText = new StyledText(composite, SWT.READ_ONLY);
		styledText.setText("Welcome to the Weasel Agile Project Planner\n\nThis application is thought to help You to manage\nprojects, releases, iterations and user stories");
		styledText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
	}

}  //  @jve:decl-index=0:visual-constraint="10,10,698,289"
